<?php

namespace App\Http\Controllers\Estate;

use App\Http\Controllers\Controller;
use App\Models\ElectricValveControlLog;
use Illuminate\Http\Request;

class ElectricValveControlLogController extends Controller
{
    public function index(Request $request)
    {
        $limit = $request->get('limit', 20);
        $data = ElectricValveControlLog::query()->with(['electric_platform_owner:id,username,mobile,room_number,community', 'community:name'])->paginate($limit)->toArray();

        return $this->success($data);
    }
}
